<%@page import="my.db.DTO.ArticleDTO"%>
<%@ include file="sites/frontHeader.jsp" %>
	<%
		ArticleDTO ar=(ArticleDTO)request.getAttribute("articledetail_id");
			if(ar!=null){
	%>	
		<div class="r-body">
				<div class="page-title">
					<p>Detail Article Information</p>
				</div>
				<div class="frm-action">
					<form action="#" method="post" >
					<table border="0" cellpadding="10">
						<tr>
							<td>
								<a href="javascript:history.go(-1);" <%-- onclick="list_author('<%=position%>')" --%>><div class="back-link"> <img src="Image/back.png"/> Back </div></a>
							</td>
							<td></td>		
						</tr>
						<tr>
							<td width="120">Book Title</td>
							<td>:<input type="text" name="articleTitle" class="articleTitle" value="<%=ar.getArticleTitle()%>"/></td>
						</tr>
						<tr>
							<td>Book Type</td>
							<td>:<input type="text" name="articleTypeID" class="articleTypeID" value="<%=ar.getArticleType().getTypeName()%>"/></td>
						</tr>
						<tr>
							<td>Author</td>
							<td>:<input type="text" class="userID" name="userID" value="<%=ar.getAuthor().getAuthorName()%>"/></td>
						</tr>
						<tr>
							<td>Public Date</td>
							<td>:<input type="text" class="articleDate" name="articleDate" value="<%=ar.getArticleDate()%>"/></td>
						</tr>
						<tr>
							<td colspan="2">
							<textarea rows="20" cols="80" name=articleContent class="articleContent" id="articleContent"><%=ar.getArticleContent()%></textarea>
							</td>
						</tr>
					</table>
					</form>
				</div>
				<div>					
				</div>
			</div><!-- end body -->
	</div><!-- end r-main -->
	<div style="width:1020px;margin:0px auto;">
		<div class="fb-comments" data-href="http://localhost:8080/Article_Management/ArticleDetail.article?articledetailid=<%=ar.getArticleNo() %>" data-numposts="5" data-width="1020px" data-colorscheme="light" style=""></div>
	</div>
	<%
					}else{
						response.sendRedirect("LoadIndex.jsp");
					}
				%>
				
	<style type="text/css">
		.stat_elem{border:2px solid #00f;background:#00f !important;}
	</style>
	<script type="text/javascript">
							function list_author(position){
								if(position=="admin"){
									window.location.href="./list_author.article";
								}else{
									window.location.href="./list_article.article";														
								}
								
							}
	</script>
	<script type="text/javascript">
		$(function(){
			CKEDITOR.replace("articleContent");
		});
	
	</script>
</body>
</html>